home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -websites- / wirenet / files / wirenet151.lzx / Updates / StartNet < prev    next >
Text File  |  1999-05-10  |  1KB  |  50 lines

  1. ; $VER: StartNet 1.51 (30.10.96)
  2. ; Starts up AmiTCP or Miami and sets everything up ready to connect to Internet
  3.  
  4. If $NetState EQ "NoNet"
  5.     If exists "ENV:Wirenet/UseMiami"
  6.         ;Start Miami
  7.         Run >NIL: AmiTCP:Miami
  8.         Wait 3
  9.         WaitForPort MIAMI.1
  10.     Else
  11.         ; Start AmiTCP
  12.         Assign APIPE: Exists > NIL:
  13.         IF Warn
  14.           Mount APIPE: from AmiTCP:devs/APipe-Mountlist
  15.         EndIf
  16.  
  17.         ; log in
  18.         AmiTCP:bin/login -f $USERNAME
  19.         AmiTCP:bin/umask 022
  20.         ; start AmiTCP
  21.         AmiTCP:AmiTCP
  22.         WaitForPort AMITCP
  23.         ; Configure loop-back device
  24.         AmiTCP:bin/ifconfig lo0 localhost
  25.  
  26.         If $IPADDRESS NOT EQ "0.0.0.0"
  27.             ; Add IP address entry for this host
  28.             rx "address AMITCP; 'ADD HOST $IPAddress $HostName'"
  29.             ; Add route to this host
  30.             AmiTCP:bin/route add $IPAddress localhost
  31.             EndIf
  32.  
  33.         Assign TCP: Exists > NIL:
  34.         IF Warn
  35.           Mount TCP: from AmiTCP:devs/Inet-Mountlist
  36.         EndIf
  37.  
  38.         ; Start the internet `super server'
  39.         run >NIL: AmiTCP:bin/inetd
  40.     EndIf
  41.  
  42.     SetEnv NetState Offline
  43.  
  44.     If Exists AmiTCP:db/User-Startnet
  45.         AmiTCP:db/User-Startnet
  46.     EndIf
  47.  
  48. EndIf
  49.  
  50.